<div class="row">

    <ul class="trasfers_ul">

        <?php
            $shor_posts = $posts;
            shuffle($shor_posts);
            $i = 0;
            foreach ($shor_posts as $key => $post) :
                if (isset($post['photo_name'])):
                    if ($i == 999)
                        break;

                    $i++;

                    $href = lang_url('transfers/' . $post['url_name'] . '-' . $post['ID']);
                    ?>


                    <li>
                        <a  href="<?= $href ?>">

                            <div class="black">

                                <h3 style="padding-left: 3px; width: 170px"><?= $post['title']; ?></h3>

                            </div>

                        </a>
                    </li>

                    <?php
                endif;
            endforeach;
        ?> 

    </ul>

</div>